home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / you-075a.lha / you-075a / copy.h < prev    next >
C/C++ Source or Header  |  1992-06-18  |  1KB  |  50 lines

  1. /* interface for copier */
  2.  
  3. int current_space(void);
  4. LispObject allocate_nbytes(LispObject *,int size,int type);
  5. int add_root(LispObject *);
  6.  
  7. #define S_G_V(x) SYSTEM_GLOBAL_VALUE(x)
  8.  
  9.  
  10. /* INTERNAL DEFINITIONS */
  11. #ifdef PAGE_SIZE     /* clash on rs6000 */
  12. #undef PAGE_SIZE
  13. #endif
  14. #define PAGE_SIZE (64*1024)
  15. extern SYSTEM_GLOBAL(SystemSemaphore,GC_sem);
  16.  
  17. #ifdef NODEBUG
  18. #define COPY_BUG(x) 
  19. #else
  20. #define COPY_BUG(x) x
  21. #endif
  22.  
  23. typedef struct page_list_struct
  24. {
  25.   struct page_list_struct *next;
  26.   int status;
  27.   char *end;
  28.   int id;
  29.   char start[sizeof(int)];
  30. } *PageList , PageEnt;
  31.  
  32. #define PAGE_FREE 0
  33. #define PAGE_USED(space) 1+(space)
  34.  
  35. #define RIG_GC_THREAD(stacktop) \
  36. { \
  37.   \
  38.   (void) system_thread_rig(stacktop,(GC_thread)); \
  39.     { LispObject* newstack; \
  40. \
  41.       newstack = load_thread(GC_thread); \
  42.       COPY_BUG(fprintf(stderr,"{GC_THREAD: %x}",newstack)); \
  43.       if (set_continue(stacktop,GC_thread->THREAD.state)) \
  44.     { \
  45.        void first_gc_mark_call(LispObject *); \
  46.        first_gc_mark_call(stacktop); \
  47.     }     \
  48.     } \
  49. }
  50.